package com.example.unruly_zhao.mopaide.table;

import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.unruly_zhao.mopaide.R;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean10;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean11;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean12;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean2;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean3;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean4;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean5;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean6;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean7;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean8;
import com.example.unruly_zhao.mopaide.bean.Meun_Bean9;

import java.util.ArrayList;
import java.util.List;


public class DemoFragment extends Fragment {

    private List<Meun_Bean> mMeun_bean;
    private List<Meun_Bean2> mMeun_bean2;
    private List<Meun_Bean3> mMeun_bean3;
    private List<Meun_Bean4> mMeun_bean4;
    private List<Meun_Bean5> mMeun_bean5;
    private List<Meun_Bean6> mMeun_bean6;
    private List<Meun_Bean7> mMeun_bean7;
    private List<Meun_Bean8> mMeun_bean8;
    private List<Meun_Bean9> mMeun_bean9;
    private List<Meun_Bean10> mMeun_bean10;
    private List<Meun_Bean11> mMeun_bean11;
    private List<Meun_Bean12> mMeun_bean12;

    private TextView mTitle;
    private ImageView mImageView;
    private Button mButton_into;
    private TextView mTitle2;
    private ImageView mImageView2;
    private Button mButton_into2;


    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {


        return inflater.inflate(R.layout.fragment_demo, container, false);
    }


    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        //去除title
        super.onActivityCreated(savedInstanceState);

        hideNavKey(getActivity());

    }

    @Override
    public void onResume() {
        super.onResume();

    }

    //隐藏虚拟按键
    public void hideNavKey(Context context) {
        View decorView = getActivity().getWindow().getDecorView();
        // Hide both the navigation bar and the status bar.
        // SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
        // a general rule, you should design your app to hide the status bar whenever you
        // hide the navigation bar.
        int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
        decorView.setSystemUiVisibility(uiOptions);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        final int page = getArguments().getInt("page");

        final int position = getArguments().getInt("position");

        TextView title = (TextView) view.findViewById(R.id.item_title);

        title.setText(page + "-" + position);

        mTitle = (TextView) view.findViewById(R.id.item_title);  // 描述

        mImageView = (ImageView) view.findViewById(R.id.imgs);  //  图标

        mButton_into = (Button) view.findViewById(R.id.btn_into);  // 进入

        mTitle2 = (TextView) view.findViewById(R.id.item_title2);  // 描述

        mImageView2 = (ImageView) view.findViewById(R.id.imgs2);  //  图标

        mButton_into2 = (Button) view.findViewById(R.id.btn_into2);  // 进入


        /**
         * page 代表Tablayout的id  position代表条目的Fragemtn的id
         */
        switch (page) {

            //  TODO 电影娱乐
            case 0:
                initData();//加载第一条数据

                mTitle.setText(mMeun_bean.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean.get(0).getImgs());

                mTitle2.setText(mMeun_bean.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean.get(1).getImgs());

                switch (position) {
                    case 0:
                        // 腾讯视屏
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.tencent.qqlive");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }

                                //  点击button改变颜色
                                //  mButton_into.setBackgroundColor(Color.parseColor("#F8F8FF"));

                            }
                        });

                        break;
                    case 1:
                        // 爱奇艺视屏
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.qiyi.video");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }

                            }
                        });

                        break;
                }

                break;
            //  TODO 新闻头条
            case 1:
                initData2();

                mTitle.setText(mMeun_bean2.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean2.get(0).getImgs());

                mTitle2.setText(mMeun_bean2.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean2.get(1).getImgs());

                // 腾讯新闻
                switch (position) {
                    case 0:

                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.tencent.news");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                        break;

                    case 1:
                        // 今日头条
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.ss.android.article.lite");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }

                            }
                        });

                        break;
                }
                break;


            //  TODO 娱乐八卦
            case 2:

                initData3();

                mTitle.setText(mMeun_bean3.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean3.get(0).getImgs());

                mTitle2.setText(mMeun_bean3.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean3.get(1).getImgs());

                // 腾讯新闻
                switch (position) {

                    case 0:

                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.tencent.news");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                        break;
                    case 1:
                        // 今日头条
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.ss.android.article.lite");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                        break;
                }
                break;

            //  TODO 热门游戏
            case 3:

                initData4();

                switch (position) {

                    case 0:

                        mTitle.setText(mMeun_bean4.get(0).getTitle());

                        mImageView.setImageResource(mMeun_bean4.get(0).getImgs());

                        mTitle2.setText(mMeun_bean4.get(1).getTitle());

                        mImageView2.setImageResource(mMeun_bean4.get(1).getImgs());

                        break;

                    case 1:

                        mTitle.setText(mMeun_bean4.get(2).getTitle());

                        mImageView.setImageResource(mMeun_bean4.get(2).getImgs());

                        mTitle2.setText(mMeun_bean4.get(3).getTitle());

                        mImageView2.setImageResource(mMeun_bean4.get(3).getImgs());

                        break;

                    case 2:

                        mTitle.setText(mMeun_bean4.get(4).getTitle());

                        mImageView.setImageResource(mMeun_bean4.get(4).getImgs());

                        mTitle2.setText(mMeun_bean4.get(5).getTitle());

                        mImageView2.setImageResource(mMeun_bean4.get(5).getImgs());

                        break;
                    case 3:

                        mTitle.setText(mMeun_bean4.get(6).getTitle());

                        mImageView.setImageResource(mMeun_bean4.get(6).getImgs());

                        mTitle2.setText(mMeun_bean4.get(7).getTitle());

                        mImageView2.setImageResource(mMeun_bean4.get(7).getImgs());

                        break;

                    case 4:

                        mTitle.setText(mMeun_bean4.get(8).getTitle());

                        mImageView.setImageResource(mMeun_bean4.get(8).getImgs());

                        mTitle2.setText(mMeun_bean4.get(9).getTitle());

                        mImageView2.setImageResource(mMeun_bean4.get(9).getImgs());

                        break;

                    default:
                        break;

                }


                switch (position) {
                    //模拟城市
                    case 0:
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.sparklingsociety.cityisland3");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                        break;

                    case 1:
                        // 捕鱼达人
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.ss.android.article.lite");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });
                    case 2:
                        // 部落冲突
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.supercell.clashofclans.wdj");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                    case 3:
                        // 植物大战僵尸
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.popcap.pvz2uc");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });
                    case 4:
                        // 纪念碑谷
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.ustwo.mounumentvalleyzz.uc");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                    case 5:
                        // 保卫萝卜
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.carrot.carrotfantasy");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                    case 6:
                        // 宾果消消乐
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.ss.android.article.lite");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                    case 7:
                        // 王者荣耀
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.ss.android.article.lite");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });
                    case 8:
                        // 球球大作战
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.ztgame.bob");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                    case 9:
                        // 枪王之王
                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.tencent.tmgp.cf");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });
                        break;

                }
                break;


            // TODO 本店优惠
            case 4:
                initData5();

                mTitle.setText(mMeun_bean5.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean5.get(0).getImgs());

                mTitle2.setText(mMeun_bean5.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean5.get(1).getImgs());

                break;

            // TODO 小游戏
            case 5:
                initData6();

                mTitle.setText(mMeun_bean6.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean6.get(0).getImgs());

                mTitle2.setText(mMeun_bean6.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean6.get(1).getImgs());

                break;

            // TODO 在线学习
            case 6:
                initData12();

                mTitle.setText(mMeun_bean12.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean12.get(0).getImgs());

                mTitle2.setText(mMeun_bean12.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean12.get(1).getImgs());

                break;

            //TODO 轻松视屏
            case 7:
                initData7();

                mTitle.setText(mMeun_bean7.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean7.get(0).getImgs());

                mTitle2.setText(mMeun_bean7.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean7.get(1).getImgs());

                switch (position) {
                    case 0:

                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.wandoujia.eyeptizer");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                        break;
                    case 1:

                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.smile.gifmaker");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com/"));
                                    startActivity(viewIntent);
                                }
                            }
                        });

                        break;
                }


                break;

            // TODO 动漫阅读
            case 8:
                initData8();

                mTitle.setText(mMeun_bean8.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean8.get(0).getImgs());

                mTitle2.setText(mMeun_bean8.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean8.get(1).getImgs());

                switch (position) {
                    // 快看动漫
                    case 0:

                        mButton_into.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {

                                try {
                                    PackageManager packageManager = getActivity().getPackageManager();
                                    Intent intent = new Intent();
                                    intent = packageManager.getLaunchIntentForPackage("com.kuaikan.comic");
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    Intent viewIntent = new
                                            Intent("android.intent.action.VIEW", Uri.parse("http://weixin.qq.com"));
                                    startActivity(viewIntent);
                                }
                            }
                        });


                        break;
                }
                break;

            //TODO 经典小说
            case 9:
                initData9();
                mTitle.setText(mMeun_bean9.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean9.get(0).getImgs());

                mTitle2.setText(mMeun_bean9.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean9.get(1).getImgs());

                break;

            //TODO 儿童教育
            case 10:
                initData10();

                mTitle.setText(mMeun_bean10.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean10.get(0).getImgs());

                mTitle2.setText(mMeun_bean10.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean10.get(1).getImgs());

                break;

            //TODO 热门应用
            case 11:
                initData11();

                mTitle.setText(mMeun_bean11.get(0).getTitle());

                mImageView.setImageResource(mMeun_bean11.get(0).getImgs());

                mTitle2.setText(mMeun_bean11.get(1).getTitle());

                mImageView2.setImageResource(mMeun_bean11.get(1).getImgs());

                break;

            default:
                break;

        }

    }


    private void initData() {

        mMeun_bean = new ArrayList<>();

        String[] jieshao = new String[]{

                "腾讯视屏", "爱奇艺视屏", "腾讯视屏",
                "爱奇艺视屏", "腾讯视屏",
                "爱奇艺视屏", "腾讯视屏", "爱奇艺视屏",
                "腾讯视屏", "爱奇艺视屏",
        };

        int[] icon = new int[]{
                R.drawable.icon_tengxun, R.drawable.icon_aiqiyi,
                R.drawable.icon_tengxun, R.drawable.icon_aiqiyi,
                R.drawable.icon_tengxun, R.drawable.icon_aiqiyi,
                R.drawable.icon_tengxun, R.drawable.icon_aiqiyi,
                R.drawable.icon_tengxun, R.drawable.icon_aiqiyi,

        };

        mMeun_bean.add(new Meun_Bean("不负好时光——腾讯视频", R.drawable.icon_tengxun));
        mMeun_bean.add(new Meun_Bean("我史上最好看的电影", R.drawable.icon_aiqiyi));
        mMeun_bean.add(new Meun_Bean("不负好时光——腾讯视频", R.drawable.icon_tengxun));
        mMeun_bean.add(new Meun_Bean("我史上最好看的电影", R.drawable.icon_aiqiyi));
        mMeun_bean.add(new Meun_Bean("不负好时光——腾讯视频", R.drawable.icon_tengxun));
        mMeun_bean.add(new Meun_Bean("我史上最好看的电影", R.drawable.icon_aiqiyi));
        mMeun_bean.add(new Meun_Bean("不负好时光——腾讯视频", R.drawable.icon_tengxun));
        mMeun_bean.add(new Meun_Bean("我史上最好看的电影", R.drawable.icon_aiqiyi));
        mMeun_bean.add(new Meun_Bean("不负好时光——腾讯视频", R.drawable.icon_tengxun));
        mMeun_bean.add(new Meun_Bean("我史上最好看的电影", R.drawable.icon_aiqiyi));


    }

    private void initData2() {

        mMeun_bean2 = new ArrayList<>();

        String[] jieshao = new String[]{

                "中国1:0省乌兹别克斯坦-2018年世界杯又有了出现的希望", "中国1:0省乌兹别克斯坦-2018年世界杯又有了出现的希望",
                "中国1:0省乌兹别克斯坦-2018年世界杯又有了出现的希望",
                "我是史上最好看的电影6", "我是史上最好看的电影7", "我是史上最好看的电影8",
                "我是史上最好看的电影9", "我是史上最好看的电影10",
        };

        int[] icon = new int[]{
                R.drawable.news_tt, R.drawable.news_tx,
                R.drawable.news_tt, R.drawable.news_tx,
                R.drawable.news_tt, R.drawable.news_tx,
                R.drawable.news_tt, R.drawable.news_tx,
                R.drawable.news_tt, R.drawable.news_tx,

        };

        mMeun_bean2.add(new Meun_Bean2("今日头条给你带来不一样的新鲜", R.drawable.news_tt));
        mMeun_bean2.add(new Meun_Bean2("腾讯新闻前所未未有的全体资讯", R.drawable.news_tx));
        mMeun_bean2.add(new Meun_Bean2("今日头条给你带来不一样的新鲜", R.drawable.news_tt));
        mMeun_bean2.add(new Meun_Bean2("腾讯新闻前所未未有的全体资讯", R.drawable.news_tx));
        mMeun_bean2.add(new Meun_Bean2("今日头条给你带来不一样的新鲜", R.drawable.news_tt));
        mMeun_bean2.add(new Meun_Bean2("腾讯新闻前所未未有的全体资讯", R.drawable.news_tx));
        mMeun_bean2.add(new Meun_Bean2("今日头条给你带来不一样的新鲜", R.drawable.news_tt));
        mMeun_bean2.add(new Meun_Bean2("腾讯新闻前所未未有的全体资讯", R.drawable.news_tx));
        mMeun_bean2.add(new Meun_Bean2("今日头条给你带来不一样的新鲜", R.drawable.news_tt));
        mMeun_bean2.add(new Meun_Bean2("腾讯新闻前所未未有的全体资讯", R.drawable.news_tx));


    }

    private void initData3() {

        mMeun_bean3 = new ArrayList<>();

        String[] jieshao = new String[]{

                "爆：谢娜怀孕10次-被家人逼着怀孕", "爆：谢娜怀孕10次-被家人逼着怀孕", "新闻2",
                "新闻3", "新闻4",
                "新闻5", "新闻6", "新闻7",
                "新闻8", "新闻9",

        };

        int[] icon = new int[]{
                R.drawable.ic_brush_black_24dp, R.drawable.ic_audiotrack_black_24dp,
                R.drawable.ic_toys_black_24dp, R.drawable.ic_home_black_24dp,
                R.drawable.ic_notifications_black_24dp, R.drawable.ic_face_black_24dp,
                R.drawable.ic_filter_vintage_black_24dp, R.drawable.ic_photo_camera_black_24dp,
                R.drawable.ic_router_black_24dp, R.drawable.ic_pets_black_24dp,

        };

        mMeun_bean3.add(new Meun_Bean3("爆：谢娜怀孕10次-被家人逼着怀孕", R.drawable.ic_brush_black_24dp));
        mMeun_bean3.add(new Meun_Bean3("爆：谢娜怀孕10次-被家人逼着怀孕", R.drawable.ic_audiotrack_black_24dp));
        mMeun_bean3.add(new Meun_Bean3("新闻3", R.drawable.ic_toys_black_24dp));
        mMeun_bean3.add(new Meun_Bean3("新闻4", R.drawable.ic_home_black_24dp));
        mMeun_bean3.add(new Meun_Bean3("新闻5", R.drawable.ic_notifications_black_24dp));
        mMeun_bean3.add(new Meun_Bean3("新闻6", R.drawable.ic_filter_vintage_black_24dp));
        mMeun_bean3.add(new Meun_Bean3("新闻7", R.drawable.ic_photo_camera_black_24dp));
        mMeun_bean3.add(new Meun_Bean3("新闻8", R.drawable.ic_pets_black_24dp));
        mMeun_bean3.add(new Meun_Bean3("新闻9", R.drawable.ic_landscape_black_24dp));
        mMeun_bean3.add(new Meun_Bean3("新闻10", R.drawable.ic_local_airport_black_24dp));


    }


    private void initData4() {

        mMeun_bean4 = new ArrayList<>();

        String[] jieshao = new String[]{

                "王者荣耀", "宾果消消乐", "保卫萝卜",
                "纪念碑谷", "植物大战僵尸",
                "部落冲突", "捕鱼达人", "模拟城市",
                "穿越火线", "欢乐斗地主",

        };

        int[] icon = new int[]{
                R.drawable.hot_game_wz, R.drawable.hot_game_bg,
                R.drawable.hot_game_bw, R.drawable.hot_game_jn, R.drawable.hot_game_jh,
                R.drawable.hot_game_blcj, R.drawable.hot_game_by,
                R.drawable.hot_game_mn, R.drawable.hot_game_cy,
                R.drawable.hot_game_hl

        };

        mMeun_bean4.add(new Meun_Bean4("王者荣耀", R.drawable.hot_game_wz));
        mMeun_bean4.add(new Meun_Bean4("宾果消消乐", R.drawable.hot_game_bg));
        mMeun_bean4.add(new Meun_Bean4("保卫萝卜", R.drawable.hot_game_bw));
        mMeun_bean4.add(new Meun_Bean4("纪念碑谷", R.drawable.hot_game_jn));
        mMeun_bean4.add(new Meun_Bean4("植物大战僵尸", R.drawable.hot_game_jh));
        mMeun_bean4.add(new Meun_Bean4("部落冲突", R.drawable.hot_game_blcj));
        mMeun_bean4.add(new Meun_Bean4("捕鱼达人", R.drawable.hot_game_by));
        mMeun_bean4.add(new Meun_Bean4("模拟城市", R.drawable.hot_game_mn));
        mMeun_bean4.add(new Meun_Bean4("穿越火线", R.drawable.hot_game_cy));
        mMeun_bean4.add(new Meun_Bean4("欢乐斗地主", R.drawable.hot_game_hl));


    }

    private void initData5() {

        mMeun_bean5 = new ArrayList<>();

        String[] jieshao = new String[]{

                "本店全部优惠", "本店全部优惠", "本店全部优惠",
                "本店全部优惠", "本店全部优惠",
                "本店全部优惠", "本店全部优惠", "本店全部优惠",
                "本店全部优惠", "本店全部优惠",

        };

        int[] icon = new int[]{
                R.drawable.ic_brush_black_24dp, R.drawable.ic_audiotrack_black_24dp,
                R.drawable.ic_toys_black_24dp, R.drawable.ic_home_black_24dp,
                R.drawable.ic_notifications_black_24dp, R.drawable.ic_face_black_24dp,
                R.drawable.ic_filter_vintage_black_24dp, R.drawable.ic_photo_camera_black_24dp,
                R.drawable.ic_router_black_24dp, R.drawable.ic_pets_black_24dp,

        };

        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_brush_black_24dp));
        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_audiotrack_black_24dp));
        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_toys_black_24dp));
        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_home_black_24dp));
        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_notifications_black_24dp));
        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_filter_vintage_black_24dp));
        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_photo_camera_black_24dp));
        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_pets_black_24dp));
        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_landscape_black_24dp));
        mMeun_bean5.add(new Meun_Bean5("本店全部优惠", R.drawable.ic_local_airport_black_24dp));


    }

    private void initData6() {

        mMeun_bean6 = new ArrayList<>();

        String[] jieshao = new String[]{

                "小游戏突出的是小", "小游戏突出的是小", "小游戏突出的是小",
                "小游戏突出的是小", "小游戏突出的是小",
                "小游戏突出的是小", "小游戏突出的是小", "小游戏突出的是小",
                "小游戏突出的是小", "小游戏突出的是小",

        };

        int[] icon = new int[]{
                R.drawable.mini_games_01, R.drawable.mini_games_02,
                R.drawable.mini_games_01, R.drawable.mini_games_02,
                R.drawable.mini_games_01, R.drawable.mini_games_02,
                R.drawable.mini_games_01, R.drawable.mini_games_02,
                R.drawable.mini_games_01, R.drawable.mini_games_02,

        };

        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_01));
        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_02));
        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_01));
        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_02));
        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_01));
        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_02));
        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_01));
        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_02));
        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_01));
        mMeun_bean6.add(new Meun_Bean6("小游戏突出的是小", R.drawable.mini_games_02));


    }

    private void initData7() {

        mMeun_bean7 = new ArrayList<>();

        String[] jieshao = new String[]{

                "开眼", "快手", "开眼",
                "快手", "开眼",
                "快手", "开眼", "快手",
                "开眼", "快手",

        };

        int[] icon = new int[]{
                R.drawable.video_ks, R.drawable.video_ty,
                R.drawable.video_ks, R.drawable.video_ty,
                R.drawable.video_ks, R.drawable.video_ty,
                R.drawable.video_ks, R.drawable.video_ty,
                R.drawable.video_ks, R.drawable.video_ty,

        };

        mMeun_bean7.add(new Meun_Bean7("开眼", R.drawable.video_ks));
        mMeun_bean7.add(new Meun_Bean7("快手", R.drawable.video_ty));
        mMeun_bean7.add(new Meun_Bean7("开眼", R.drawable.video_ks));
        mMeun_bean7.add(new Meun_Bean7("快手", R.drawable.video_ty));
        mMeun_bean7.add(new Meun_Bean7("开眼", R.drawable.video_ks));
        mMeun_bean7.add(new Meun_Bean7("快手", R.drawable.video_ty));
        mMeun_bean7.add(new Meun_Bean7("开眼", R.drawable.video_ks));
        mMeun_bean7.add(new Meun_Bean7("快手", R.drawable.video_ty));
        mMeun_bean7.add(new Meun_Bean7("开眼", R.drawable.video_ks));
        mMeun_bean7.add(new Meun_Bean7("快手", R.drawable.video_ty));


    }

    private void initData8() {

        mMeun_bean8 = new ArrayList<>();

        String[] jieshao = new String[]{

                "腾讯动漫", "腾讯动漫", "腾讯动漫",
                "腾讯动漫", "腾讯动漫",
                "腾讯动漫", "腾讯动漫", "腾讯动漫",
                "腾讯动漫", "腾讯动漫",

        };

        int[] icon = new int[]{
                R.drawable.cartoon_kk, R.drawable.cartoon_tx,
                R.drawable.cartoon_kk, R.drawable.cartoon_tx,
                R.drawable.cartoon_kk, R.drawable.cartoon_tx,
                R.drawable.cartoon_kk, R.drawable.cartoon_tx,
                R.drawable.cartoon_kk, R.drawable.cartoon_tx,

        };

        mMeun_bean8.add(new Meun_Bean8("快看动漫", R.drawable.cartoon_kk));
        mMeun_bean8.add(new Meun_Bean8("腾讯动漫", R.drawable.cartoon_tx));
        mMeun_bean8.add(new Meun_Bean8("快看动漫", R.drawable.cartoon_kk));
        mMeun_bean8.add(new Meun_Bean8("腾讯动漫", R.drawable.cartoon_tx));
        mMeun_bean8.add(new Meun_Bean8("快看动漫", R.drawable.cartoon_kk));
        mMeun_bean8.add(new Meun_Bean8("腾讯动漫", R.drawable.cartoon_tx));
        mMeun_bean8.add(new Meun_Bean8("快看动漫", R.drawable.cartoon_kk));
        mMeun_bean8.add(new Meun_Bean8("腾讯动漫", R.drawable.cartoon_tx));
        mMeun_bean8.add(new Meun_Bean8("快看动漫", R.drawable.cartoon_kk));
        mMeun_bean8.add(new Meun_Bean8("腾讯动漫", R.drawable.cartoon_tx));


    }

    private void initData9() {

        mMeun_bean9 = new ArrayList<>();

        String[] jieshao = new String[]{

                "天龙八部", "倚天屠龙记", "水浒传",
                "斗破苍穹", "斗罗大陆",
                "择天记", "武动乾坤", "星辰变",
                "火影忍者", "海贼王",

        };

        int[] icon = new int[]{
                R.drawable.fiction_xs2, R.drawable.fiction_xspng,
                R.drawable.fiction_xs2, R.drawable.fiction_xspng,
                R.drawable.fiction_xs2, R.drawable.fiction_xspng,
                R.drawable.fiction_xs2, R.drawable.fiction_xspng,
                R.drawable.fiction_xs2, R.drawable.fiction_xspng,

        };

        mMeun_bean9.add(new Meun_Bean9("天龙八部", R.drawable.fiction_xs2));
        mMeun_bean9.add(new Meun_Bean9("倚天屠龙记", R.drawable.fiction_xspng));
        mMeun_bean9.add(new Meun_Bean9("水浒传", R.drawable.fiction_xs2));
        mMeun_bean9.add(new Meun_Bean9("斗破苍穹", R.drawable.fiction_xspng));
        mMeun_bean9.add(new Meun_Bean9("斗罗大陆", R.drawable.fiction_xs2));
        mMeun_bean9.add(new Meun_Bean9("择天记", R.drawable.fiction_xspng));
        mMeun_bean9.add(new Meun_Bean9("武动乾坤", R.drawable.fiction_xs2));
        mMeun_bean9.add(new Meun_Bean9("星辰变", R.drawable.fiction_xspng));
        mMeun_bean9.add(new Meun_Bean9("火影忍者", R.drawable.fiction_xs2));
        mMeun_bean9.add(new Meun_Bean9("海贼王", R.drawable.fiction_xspng));


    }

    private void initData10() {

        mMeun_bean10 = new ArrayList<>();

        String[] jieshao = new String[]{

                "静夜思", "悯农", "登黄鹤楼",
                "游子吟", "清明",
                "登高", "后宫词", "行宫",
                "春晓", "江雪",

        };

        int[] icon = new int[]{
                R.drawable.children_tspng, R.drawable.children_yingyu,
                R.drawable.children_tspng, R.drawable.children_yingyu,
                R.drawable.children_tspng, R.drawable.children_yingyu,
                R.drawable.children_tspng, R.drawable.children_yingyu,
                R.drawable.children_tspng, R.drawable.children_yingyu,

        };

        mMeun_bean10.add(new Meun_Bean10("静夜思", R.drawable.children_tspng));
        mMeun_bean10.add(new Meun_Bean10("悯农", R.drawable.children_yingyu));
        mMeun_bean10.add(new Meun_Bean10("登黄鹤楼", R.drawable.children_tspng));
        mMeun_bean10.add(new Meun_Bean10("游子吟", R.drawable.children_yingyu));
        mMeun_bean10.add(new Meun_Bean10("清明", R.drawable.children_tspng));
        mMeun_bean10.add(new Meun_Bean10("登高", R.drawable.children_yingyu));
        mMeun_bean10.add(new Meun_Bean10("后宫词", R.drawable.children_tspng));
        mMeun_bean10.add(new Meun_Bean10("行宫", R.drawable.children_yingyu));
        mMeun_bean10.add(new Meun_Bean10("春晓", R.drawable.children_tspng));
        mMeun_bean10.add(new Meun_Bean10("江雪", R.drawable.children_yingyu));

    }

    private void initData11() {

        mMeun_bean11 = new ArrayList<>();

        String[] jieshao = new String[]{

                "墨迹天气", "百度地图", "墨迹天气",
                "百度地图", "墨迹天气",
                "百度地图", "墨迹天气", "百度地图",
                "墨迹天气", "百度地图",

        };

        int[] icon = new int[]{
                R.drawable.mojitianqi, R.drawable.baiduditu,
                R.drawable.mojitianqi, R.drawable.baiduditu,
                R.drawable.mojitianqi, R.drawable.baiduditu,
                R.drawable.mojitianqi, R.drawable.baiduditu,
                R.drawable.mojitianqi, R.drawable.baiduditu,

        };

        mMeun_bean11.add(new Meun_Bean11("墨迹天气", R.drawable.mojitianqi));
        mMeun_bean11.add(new Meun_Bean11("百度地图", R.drawable.baiduditu));
        mMeun_bean11.add(new Meun_Bean11("墨迹天气", R.drawable.mojitianqi));
        mMeun_bean11.add(new Meun_Bean11("百度地图", R.drawable.baiduditu));
        mMeun_bean11.add(new Meun_Bean11("墨迹天气", R.drawable.mojitianqi));
        mMeun_bean11.add(new Meun_Bean11("百度地图", R.drawable.baiduditu));
        mMeun_bean11.add(new Meun_Bean11("墨迹天气", R.drawable.mojitianqi));
        mMeun_bean11.add(new Meun_Bean11("百度地图", R.drawable.baiduditu));
        mMeun_bean11.add(new Meun_Bean11("墨迹天气", R.drawable.mojitianqi));
        mMeun_bean11.add(new Meun_Bean11("百度地图", R.drawable.baiduditu));

    }

    private void initData12() {

        mMeun_bean12 = new ArrayList<>();

        String[] jieshao = new String[]{

                "在线学习", "在线学习", "在线学习",
                "在线学习", "在线学习",
                "在线学习", "在线学习", "在线学习",
                "在线学习", "在线学习",

        };

        int[] icon = new int[]{
                R.drawable.study_xe, R.drawable.study_hj,
                R.drawable.study_xe, R.drawable.study_hj,
                R.drawable.study_xe, R.drawable.study_hj,
                R.drawable.study_xe, R.drawable.study_hj,
                R.drawable.study_xe, R.drawable.study_hj,

        };

        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_xe));
        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_hj));
        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_xe));
        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_hj));
        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_xe));
        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_hj));
        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_xe));
        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_hj));
        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_xe));
        mMeun_bean12.add(new Meun_Bean12("在线学习", R.drawable.study_hj));

    }


}
